package com.yue.se.thread.test;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by yueyang on 2016/8/28.
 */
public class A {


    private void upload(){
        System.out.println("上传文件");
        System.out.flush();
    }

    private void download(){
        System.out.println("下载文件");
        System.out.flush();
    }

    public static void main(String[] args) throws Exception {
        C c = new C();
        ExecutorService exec = Executors.newCachedThreadPool();
        System.out.println(exec.submit(new B()).get());
        exec.shutdown();
//        Thread t1 = new Thread(new B(c));   //lianjie
//        Thread t2 = new Thread(new D(c));   //zijian

//        A a = new A();

//        a.upload();
//        t1.start();
//        t2.start();

//        t1.join();
//        t1.stop();
//        t2.stop();

//        a.download();


    }
}
